Get the GMT and Local current timeΒΆ

Get the GMT and Local current time.
from time import gmtime, strftime

print("GMT time:   " + strftime("%a, %d %b %Y %I:%M:%S %p %Z", gmtime()))
print("Local time: " + strftime("%a, %d %b %Y %I:%M:%S %p %Z"))

Output:

GMT time:   Mon, 15 Oct 2018 06:19:05 AM Ame
Local time: Mon, 15 Oct 2018 07:21:08 AM ric